﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

using ESF.MUP.BasePlatform.Domain.Model;
using ESF.MUP.BasePlatform.DbRepositories;

namespace ESF.MUP.BasePlatform.DbRepository.MSSQL.Model
{
    public class ApplicationModelBuilder : EntityTypeConfiguration<Application>
    {

        public ApplicationModelBuilder()
        {
            //Key 
            this.HasKey(a => a.Name);

            //Column
            this.Property(a => a.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            //Table
            this.ToTable("Applications");
        }

    }

}
